From: Andrew Cooper Date: Tue, 7 Apr 2015 17:26:18 +0000 (+0100) Subject: x86/link: Introduce and use __bss_end X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~3447 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=7b7bf15949fb13785e6e581a28393aa672179c24;p=xen.git x86/link: Introduce and use __bss_end No functional change. Signed-off-by: Andrew Cooper CC: Keir Fraser CC: Jan Beulich Reviewed-by: Tim Deegan --- diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S index c99f73930d..2d0e56c26f 100644 --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -124,7 +124,7 @@ __start: /* Initialize BSS (no nasty surprises!) */ mov $sym_phys(__bss_start),%edi - mov $sym_phys(_end),%ecx + mov $sym_phys(__bss_end),%ecx sub %edi,%ecx xor %eax,%eax rep stosb diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 89e4827696..2b9787a163 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -185,7 +185,7 @@ static void free_xen_data(char *s, char *e) memguard_guard_range(__va(__pa(s)), e-s); } -extern char __init_begin[], __init_end[], __bss_start[]; +extern char __init_begin[], __init_end[], __bss_start[], __bss_end[]; static void __init init_idle_domain(void) { @@ -1497,7 +1497,7 @@ int __hwdom_init xen_in_range(unsigned long mfn) xen_regions[region_text].e = __pa(&__init_begin); /* bss */ xen_regions[region_bss].s = __pa(&__bss_start); - xen_regions[region_bss].e = __pa(&_end); + xen_regions[region_bss].e = __pa(&__bss_end); } start = (paddr_t)mfn << PAGE_SHIFT; diff --git a/xen/arch/x86/tboot.c b/xen/arch/x86/tboot.c index 7b95ad3f2e..01b95302bb 100644 --- a/xen/arch/x86/tboot.c +++ b/xen/arch/x86/tboot.c @@ -48,7 +48,7 @@ static uint64_t __initdata sinit_base, __initdata sinit_size; #define TXTCR_HEAP_BASE 0x0300 #define TXTCR_HEAP_SIZE 0x0308 -extern char __init_begin[], __bss_start[]; +extern char __init_begin[], __bss_start[], __bss_end[]; #define SHA1_SIZE 20 typedef uint8_t sha1_hash_t[SHA1_SIZE]; @@ -374,7 +374,7 @@ void tboot_shutdown(uint32_t shutdown_type) __pa(&_stext); /* bss */ g_tboot_shared->mac_regions[2].start = (uint64_t)__pa(&__bss_start); - g_tboot_shared->mac_regions[2].size = __pa(&_end) - __pa(&__bss_start); + g_tboot_shared->mac_regions[2].size = __pa(&__bss_end) - __pa(&__bss_start); /* * MAC domains and other Xen memory diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S index c8541813ed..4699a04b79 100644 --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -175,6 +175,7 @@ SECTIONS *(.bss.percpu.read_mostly) . = ALIGN(SMP_CACHE_BYTES); __per_cpu_data_end = .; + __bss_end = .; } :text _end = . ;